[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ChDir                    Changes Current Directory

 ChDir(DirPath : <string>);                                              [TP]

    Changes the current drive and directory. This procedure is the
    equivalent of the 'CD' command under MS-DOS, but this service can also
    change the active drive, whereas MS-DOS's CD will not change the
    active drive.

         DirPath    Any legal pathname; if no drive is specified, the
                    current drive is assumed. If the pathname does not
                    start with a backslash ('\'), the pathname is relative
                    to the current directory.

          Notes:    If the pathname is not a valid one, an I/O error 1
                    ($1) occurs at run time. If you have disabled I/O
                    errors with the {$I-} compiler option, IOResult
                    returns a value of 1 ('File not found').

                    If only a drive is specified, ChDir makes the drive
                    specified the new active drive.

  -------------------------------- Example ---------------------------------

           ChDir('C:\DOCS\ADDR');
           ChDir('..');             { Move to this directory's parent }
           ChDir('A:');             { Log onto drive A: }

See Also: GetDir MkDir RmDir
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson